package cn.coder.toolkit;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class CList<T> extends ArrayList<T> {

    public static void main(String[] args) {
        CList<String> list = CList.of();
        System.out.println(list);
    }

    private CList(Collection<? extends T> c) {
        super(c);
    }

    @SafeVarargs
    public static <T> CList<T> of(T... ts) {
        return new CList<>(Arrays.asList(ts));
    }

    public static <T> CList<T> of(Collection<? extends T> c) {
        return new CList<>(c);
    }

}
